1. Field of the Invention
The present invention relates to a method, system, and article of manufacture for using annotations to reuse variable declarations to generate different service functions.
2. Description of the Related Art
Legacy applications, such as a third generation programming languages (e.g., Common Business-Oriented Language (COBOL), etc.) may utilize COPYBOOK or other “include” mechanisms to re-use data declarations for multiple programs or functions. Typically, such application architectures were used in closed environments in such a way as to eliminate the necessity for controlling what parts of the data declaration would be relevant or visible to the callers of those various functions. Typically, only relevant parts of the interface would be set by the callers' program logic and irrelevant data parts would be ignored.
Program developers have been implementing services and functions in the legacy application that use the COPYBOOK in a different programming environment, such as a service in a Services Oriented Architectures (SOA) environment. Programmers implementing service functions that utilize the COPYBOOK or include mechanism may use a tool that allows them to select which variables in the COPYBOOK to include with the service function being generated for the different programming environment. A graphical user interface (GUI) may display the variables in the COPYBOOK and allow the user to select which variables to include or exclude from a particular service function being generated. This information on the selected variables from the COPYBOOK may be maintained outside the COPYBOOK for use by the tool generating the service function.
Certain programmers include annotations in the COPYBOOK which may be used by multiple programs. Annotations are metadata included in a program source that is written in a “host” programming language such as a JAVA™ or COBOL programming language. (Java is a trademark of Sun Microsystems, Inc. in the United States and foreign countries)
There is a need in the art for improved techniques for reusing declaration files, such as the COBOL COPYBOOK file, when generating service functions to operate in a programming environment different from the programming environment in which the declaration file, e.g., COPYBOOK, was generated, which may comprise a legacy application such as COBOL.